package es.duma.search;

import es.duma.util.log.Log;

import java.util.Vector;

public class SearchObject {
    private Vector keys;
    private Vector keys_not;
    private Vector services;
    private  int maxResults=0;
    private String language=null;

    
    
    public SearchObject() {
        Log.debug(this,"creaccion de objeto SearchOBJ");
        keys=new Vector();
        keys_not=new Vector();
        services=new Vector();
    }
    
    public void addKey(String key){
        keys.add(key);
    }
    
    public void addKeyNot(String key){
        keys_not.add(key);
    }
    
    public void addService(String service){
        services.add(service);
    }

    public void setMaxResults(String maxResults) {
        try{
            this.maxResults = Integer.parseInt(maxResults);
        }catch (NumberFormatException e){
            Log.error(this,"Error al parsear el parametro max-results");
        }
    }



    public Vector getKeys() {
        return keys;
    }

    public Vector getServices() {
        return services;
    }

    public int getMaxResults() {
        return maxResults;
    }

    public Vector getKeys_not() {
        return keys_not;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public String getLanguage() {
        return language;
    }
}
